<template>
  <div class="xinxuan" v-if="echongs">
    <p>
      {{ xx.title }} <span>{{ xx.subtitle }}</span>
    </p>
    <div>
      <div :id="v.target.param" v-for="(v, i) in xx.list" :key="i">
        <img :src="v.goods_img" alt="" />
        <p>{{ v.title }}</p>
        <span>￥{{ v.sale_price }}</span
        ><del>￥{{ v.market_price }}</del>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "xinxuan",
  computed: {
    ...mapState(["echongs"]),
    xx() {
      return this.echongs.data.datas.list[6].data;
    },
  },
};
</script>

<style lang="less" scoped>
.xinxuan {
  font-size: 0.2rem;
  width: 97%;
  box-sizing: border-box;
  padding: 0.2rem;
  margin: 0.5rem auto 0;
  border-radius: 0.2rem 0.5rem 0.2rem 0.2rem;
  background-color: rgb(255, 255, 255);
  > p {
    display: block;
    margin: 0;
    font-size: 0.36rem;
    font-weight: 700;
    > span {
      font-size: 0.24rem;
      color: #ccc;
      vertical-align: -0.04rem;
      font-weight: 500;
    }
  }
  > div {
    width: 100%;
    display: flex;
    justify-content: space-around;
    > div {
      width: 33%;
      > img {
        width: 2.1rem;
        border-radius: 0.2rem;
        border: .02rem solid rgb(240, 237, 237);
      }
      > span {
        font-size: 0.28rem;
        font-weight: 700;
      }
      > del {
        color: #ccc;
      }
      > p {
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
  }
}
</style>